﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
    public class R低频压接实验测量记录表 : RTableBase
    {

        public R低频压接实验测量记录表(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string toolUsed, string secondToolUsed, string thirdToolUsed, string recordItem ,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;
            ToolUsed = toolUsed;
            SecondToolUsed = secondToolUsed;
            ThirdToolUsed = thirdToolUsed;
            RecordItem = recordItem;
            RecordRemark = recordRemark;
        }

        public override string FormName { get; protected set; } = "低频压接实验测量记录表";

        #region  A12_压接钳编号
        public override string ToolUsed_DisplayName { get; protected set; } = "压接钳编号";
  
        #endregion
        #region A15_微欧计编号
        public override string SecondToolUsed_DisplayName { get; protected set; } = "_微欧计编号";

        #endregion
        #region A16_高阻表编号
        public override string ThirdToolUsed_DisplayName { get; protected set; } = "高阻表编号";

        #endregion
        #region A11_测力计编号
        public override string RecordItem_DisplayName { get; protected set; } = "测力计编号";

        #endregion
        /// <summary>
        /// 记录要求
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="recordLocation"></param>
        /// <param name="recordRequire"></param>
        /// <param name="recordStatus"></param>
        /// <param name="recordMainopoint"></param>
        /// <returns></returns>
        public RRecordRequirementsEntity SetRecordRequirements(RRecordRequirementsEntity entity, string recordLocation, string recordRequire, string recordStatus, string recordMainopoint)
        {
            entity.SetRecordLocation(recordLocation, "中间接头型");
            entity.SetRecordRequire(recordRequire, "拉脱力检查");
            entity.SetRecordStatus(recordStatus, "压接电阻检查");
            entity.SetRecordMainopoint(recordMainopoint, "抗电强度检查");
            return entity;
        }
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="firstMeasuredValues"></param>
        /// <param name="secondMeasuredValues"></param>
        /// <param name="thirdMeasuredValues"></param>
        /// <returns></returns>

        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string firstMeasuredValues, string secondMeasuredValues, string thirdMeasuredValues)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "实测值1");
            entity.SetSecondMeasuredValues(secondMeasuredValues, "实测值2");
            entity.SetThirdMeasuredValues(thirdMeasuredValues, "实测值3");
            return entity;
        }
        /// <summary>
        /// 三检
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime, string secondOperator, DateTime? secondOperatorTime, string thirdOperator, DateTime? thirdOperatorTime)
        {
            entity.InspectionSignatureName = "三检";
            entity.SetFirstOperator(firstOperator, "操作者", firstOperatorTime, "操作者操作时间");
            entity.SetSecondOperator(secondOperator, "互检者", secondOperatorTime, "互检者操作时间");
            entity.SetThirdOperator(thirdOperator, "检验员", thirdOperatorTime, "检验员操作时间");
            return entity;
        }
    }
}
